<div class="detail-basic">
<table class="pdetail">
	<tbody>
		<tr>
			<td colspan="11"><b>実習生履歴書 (LÝ LỊCH THỰC TẬP SINH)</b></td>
			<td rowspan="7" width="140">
				<?php                                     
				if($model->photo_url == null || $model->photo_url == ""){
					echo CHtml::image("media/profile/no_image.jpg","",
					array("id" => "thumbnail","width"=>"140px" ,"height"=>"190px"));
				}else{
					$imgSrc = file_exists(PROFILE_FOLDER . $model->photo_url)? SITE_URL. "media/profile/" . $model->photo_url : SITE_URL. "media/profile/no_image.jpg";
					echo CHtml::image($imgSrc,"",
					array("id" => "thumbnail","width"=>"140px" ,"height"=>"190px"));
				}
				?>
			</td>
		</tr>
		<tr>
			<td class="yel">フリガナ</td>
			<td colspan="8" align="center"><?php echo isset($translatedModel)?Html::encode($translatedModel->full_name):'';?></td>
			<td rowspan="2" class="yel">性別<br/>Giới tính</td>
			<td><img style="width:16px" src="<?php echo Yii::app()->theme->baseUrl; ?>/images/icons-16/<?php echo ($model->sex == 1)?'box-checked':'box-unchecked'?>.png" /> Nam</td>
		</tr>
		<tr>
			<td rowspan="2" class="yel">氏名<br/>Họ và tên</td>
			<td colspan="8" rowspan="2" class="fullname" align="center"><?php echo Html::encode($model->full_name)?></td>
			<td><img style="width:16px" src="<?php echo Yii::app()->theme->baseUrl; ?>/images/icons-16/<?php echo ($model->sex == 0)?'box-checked':'box-unchecked'?>.png" /> Nữ</td>
		</tr>
		<tr>
			<td>年齢 / Tuổi</td>
			<td align="center">
				<?php 
					$birthdate = new DateTime($model->birth_date);
					$today     = new DateTime();
					$interval  = $today->diff($birthdate);
					echo $interval->format('%y');
				?>
			</td>
		</tr>
		<tr>
			<td class="yel">生年月日<br/>Ngày sinh</td>
			<td align="center"><?php echo date('Y', strtotime($model->birth_date));?></td>
			<td align="center">年<br/>Năm</td>
			<td align="center"><?php echo date('m', strtotime($model->birth_date));?></td>
			<td align="center">月<br/>Tháng</td>
			<td align="center"><?php echo date('d', strtotime($model->birth_date));?></td>
			<td align="center">日<br/>Ngày</td>
			<td align="center">出身地<br/>Nơi sinh</td>
			<td align="center"><?php echo Html::encode($model->province->province_name)?></td>
			<td colspan="2" align="center"><?php echo Html::encode($model->province->region->region_name) . ' - ' . Html::encode($model->province->region->name_jp)?></td>
		</tr>
		<tr>
			<td class="yel">連絡先<br/>Địa chỉ liên lạc</td>
			<td colspan="10"><?php echo Html::encode($model->address)?></td>
		</tr>
                <tr>
			<td class="yel">Số điện thoại</td>
			<td colspan="10"><?php echo Html::encode($model->phone_number)?></td>
		</tr>
	</tbody>
</table>
</div>
